package com.exercise.memberscheduling.repository.mapper;

import com.exercise.memberscheduling.domain.valueObject.Member;
import com.exercise.memberscheduling.domain.valueObject.MemberOperate;
import com.exercise.memberscheduling.security.UserLogin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MemberMapper {
    //单个会员添加课程
    void addCoursesTimes(@Param("addTimes") int addTimes, @Param("member")Member member );
    //会员上1节课
    void BeginClass(@Param("member")Member member);
    //添加操作记录
    void addOperateRecord(@Param("memberOperate")MemberOperate memberOperate);
    //根据Id查询会员信息
    Member selectMemberLeftCourses(@Param("member")Member member);
    //根据姓名查询会员信息
    List<Member> selectMemberByName(@Param("member")Member member);
    //查询所有会员的信息
    List<Member> selAllMembers();
    //批量增加会员信息
    void addMemberInfos(@Param("members")List<Member>members);
    //添加一个会员信息
    void addMemberInfo(@Param("member")Member member);
    //查询所有操作记录
    List<MemberOperate> selAllOperate();
    //根据用户查找操作记录
    List<MemberOperate> selOperateByMemberName(@Param("member")Member member);
    //更改会员姓名
    void changeMemberName(@Param("member")Member member);
    //修改会员的课程数
    void reviseMemberCoursesTimes(@Param("member")Member member);
    //修改管理员密码
    void reviseAdminPassword(@Param("password")String password);
    //查询管理员密码
    UserLogin SelAdminPassword();
    //删除一个会员
    void deleteMember(@Param("memberId")String memberId);
    //查询某一段时间内的操作记录
    List<MemberOperate> selPeriodOperate(@Param("startTime")String startTime ,@Param("endTime")String endTime);
}
